import Mock from "mockjs";
import homeApi from './mockData/home'
import userApi from './mockData/user'
import permission from "./mockData/permission";
//拦截请求
//本地获取user的数据
//默认是get请求
//首页左下数据
Mock.mock('/home/getData', homeApi.getHomeData)

//用户列表数据
Mock.mock(/user\/getUser/, userApi.getUserList)
//增加用户
Mock.mock(/user\/add/,'post', userApi.createUser)
//编辑用户
Mock.mock(/user\/edit/,'post', userApi.updateUser)
//删除用户
Mock.mock(/user\/delete/, userApi.deleteUser)

//根据用户的用户名不同 返回不一样的菜单列表
Mock.mock(/permission\/getMenu/,'post', permission.getMenu)

